<?php
if(!$result){
    $result = array('error'=>'Not found');
}
echo json_encode($result);
?>